-- GENERATED SPELL FOR [Wyrmcult Hewer] --


function spell0_21810(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_21810', 654, 1)
end

function spell1_21810(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_21810', 603, 1)
end

function spell2_21810(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(37704,pUnit)
pUnit:RegisterEvent('Sorts_21810', 2000, 1)
end

function Sorts_21810(pUnit, Event)
local choix_sorts_21810 = math.random(0, 2)
if choix_sorts_21810 == 0 then
pUnit:RegisterEvent('spell0_21810', 1, 1)
end
if choix_sorts_21810 == 1 then
pUnit:RegisterEvent('spell1_21810', 1, 1)
end
if choix_sorts_21810 == 2 then
pUnit:RegisterEvent('spell2_21810', 1, 1)
end
end

function mob21810_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21810', math.random(1500, 3000), 1)
end

function mob21810_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21810_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21810_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21810, 1, 'mob21810_Action')
RegisterUnitEvent(21810, 2, 'mob21810_Leave')
RegisterUnitEvent(21810, 3, 'mob21810_Kill')
RegisterUnitEvent(21810, 4, 'mob21810_Die')
